import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/views/layout'
Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    // { path: '/', redirect: '/dashboard' },
    {
      path: '/login',
      component: () => import('@/views/login')
    },
    {
      path: '/',
      component: Layout,
      redirect: '/login',
      children: [
        { path: 'dashboard', component: () => import('@/views/dashboard') },
        { path: 'article', component: () => import('@/views/article') }
      ]
    }
  ]
})

export default router
